package feizhou.untils.tools.IdGenerate;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @ClassName: IdGenerateUtil
 * @Description id 生成器
 * @Author feizhou
 * @Date 2023/3/10  10:38
 * @Verson 1.0
 **/

public class IdGenerateUtil {
    protected static Logger logger = LoggerFactory.getLogger(IdGenerateUtil.class);
    private static SnowFlake snowFlake = new SnowFlake(3L, 10L);


    public static long nextId() {
        long l = snowFlake.nextId();
        logger.debug("snowFlake.nextId() = " + l);
        return l;
    }

    public static void main(String[] args) {
        nextId();
    }
}

